using System;
using System.Collections.Generic;
using System.Text;

namespace CILDiffLibPrime.Attributes
{
    public enum SignatureChange
    {
        Same,
        New,
        Deleted,
    }

    public enum ElementChange
    {
        Same,
        New,
        Deleted,
        Modified
    }

    public enum PropertyChange
    {
        Same,
        Different
    }

    public struct SectionChange
    {
        public SectionChange(int differenceType, string difference)
        {
            this.DifferenceType = differenceType;
            this.Difference = difference;
        }
        public int DifferenceType;
        public string Difference;
    }

    [AttributeUsage(
    AttributeTargets.Constructor |
    AttributeTargets.Method)]
    public class CILDiff_MethodDifferenceAttribute : Attribute
    {
        public SectionChange Signature;
        public SectionChange Body;
        public SectionChange ReturnType;
        public SectionChange Attributes;
        public SectionChange Properities;
        public SectionChange Overrides;
        public SectionChange Parameters;
        public SectionChange GenericParameters;
        public SectionChange CustomAttributes;

        public CILDiff_MethodDifferenceAttribute( int signatureI, string signatureS,
            int bodyI, string bodyS, int returnTypeI, string returnTypeS, int attributesI, string attributesS,
            int propertiesI, string propertiesS, int overridesI, string overridesS,
            int parametersI, string parametersS, int genericParametersI, string genericParametersS,
            int customAttributesI, string customAttributesS)
        {
            Signature = new SectionChange(signatureI, signatureS);
            Body = new SectionChange(bodyI,bodyS);
            ReturnType = new SectionChange(returnTypeI,returnTypeS);
            Attributes = new SectionChange(attributesI,attributesS);
            Properities = new SectionChange(propertiesI,propertiesS);
            Overrides = new SectionChange(overridesI,overridesS);
            Parameters = new SectionChange(parametersI,parametersS);
            GenericParameters = new SectionChange(genericParametersI,genericParametersS);
            CustomAttributes = new SectionChange(customAttributesI,customAttributesS);
        }
    }

    [AttributeUsage(AttributeTargets.Field)]
    public class CILDiff_FieldDifferenceAttribute : Attribute
    {
        public SectionChange Signature;
        public SectionChange Attributes;
        public SectionChange Properities;
        public SectionChange CustomAttributes;

        public CILDiff_FieldDifferenceAttribute(int signatureI, string signatureS, int attributesI,
            string attributesS, int propertiesI, string propertiesS, int customAttributesI, string customAttributesS)
        {
            Signature = new SectionChange(signatureI, signatureS);
            Attributes = new SectionChange(attributesI, attributesS);
            Properities = new SectionChange(propertiesI, propertiesS);
            CustomAttributes = new SectionChange(customAttributesI, customAttributesS);
        }
    }

    [AttributeUsage(AttributeTargets.Property)]
    public class CILDiff_PropertyDifferenceAttribute : Attribute
    {
        public SectionChange Signature;
        public SectionChange Attributes;
        public SectionChange Properities;
        public SectionChange CustomAttributes;
        public CILDiff_PropertyDifferenceAttribute(int signatureI, string signatureS, int attributesI,
            string attributesS, int propertiesI, string propertiesS, int customAttributesI, string customAttributesS)
        {
            Signature = new SectionChange(signatureI, signatureS);
            Attributes = new SectionChange(attributesI, attributesS);
            Properities = new SectionChange(propertiesI, propertiesS);
            CustomAttributes = new SectionChange(customAttributesI, customAttributesS);
        }
    }

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
    public class CILDiff_ClassDifferenceAttribute : Attribute
    {
        public SectionChange Signature;
        public SectionChange Attributes;
        public SectionChange Properities;
        public SectionChange CustomAttributes;
        public SectionChange Interfaces;
        public CILDiff_ClassDifferenceAttribute(int signatureI, string signatureS, int attributesI,
            string attributesS, int propertiesI, string propertiesS, int customAttributesI,
            string customAttributesS, int interfacesI, string interfacesS)
        {
            Signature = new SectionChange(signatureI, signatureS);
            Attributes = new SectionChange(attributesI, attributesS);
            Properities = new SectionChange(propertiesI, propertiesS);
            CustomAttributes = new SectionChange(customAttributesI, customAttributesS);
            Interfaces = new SectionChange(interfacesI, interfacesS);
        }
    }
}